<%-- 
    Document   : edit
    Created on : 22.07.2009, 21:26:07
    Author     : Mario
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="../STYLES/serverStyles.css" />
        <title>FBIS - ADMIN / USER BEARBEITEN</title>
    </head>
    <body>
        <%
        String id = request.getParameter("id");
        String fn = request.getParameter("fn");
        String sn = request.getParameter("sn");
        String un = request.getParameter("un");
        String pass = request.getParameter("pass");
        String mail = request.getParameter("mail");
        String admin = request.getParameter("admin");
        String status = request.getParameter("status");
        String intern = request.getParameter("intern");
        %>
        <form method="GET" action="doEdit.jsp">
            <table class="Prices">
                <thead><th>Eintrag</th><th>Alt</th><th colspan=2>Neu</th></thead>
                <tbody>
                    <tr>
                        <td>Vorname:&nbsp;</td>
                        <td><%= fn%></td>
                        <td colspan=2><input type="text" name="fn" value="<%=fn%>"/></td>
                    </tr>
                    <tr>
                        <td>Nachname:&nbsp;</td>
                        <td><%= sn%></td>
                        <td colspan=2><input type="text" name="sn" value="<%=sn%>"/></td>
                    </tr>
                    <tr>
                        <td>Email:&nbsp;</td>
                        <td><%= mail%></td>
                        <td colspan=2><input type="text" name="mail" value="<%=mail%>"/></td>
                    </tr>
                    <tr>
                        <td>Username:&nbsp;</td>
                        <td><%= un%></td>
                        <td colspan=2><input type="text" name="un" value="<%=un%>"/></td>
                    </tr>
                    <tr>
                        <td>Passwort:&nbsp;</td>
                        <td><%= pass%></td>
                        <td><input type="text" name="pass_one"/></td>
                        <td><input type="text" name="pass_two"/></td>
                    </tr>
                    <tr>
                        <td>Administrator:&nbsp;</td>
                        <td><%= admin%></td>
                        <td colspan=2>
                            <select name="admin" >
                                <%
        if (admin.equals("0")) {
            out.print("<option value=\"0\" selected>0</option>");
            out.print("<option value=\"1\">1</option>");
        } else {
            out.print("<option value=\"1\" selected>1</option>");
            out.print("<option value=\"0\">0</option>");
        }


                                %>
                                <option>1</option>
                                <option>0</option>
                            </select>

                        </td>
                    </tr>
                    <tr>
                        <td>Status:&nbsp;</td>
                        <td><%= status%></td>
                        <td colspan=2>
                            <select name="status">
                                <%
        if (status.equals("AH")) {
            out.print("<option value=\"AH\" selected>");
        } else {
            out.print("<option value=\"AH\">");
        }
        out.print("AH</option>");
        //----------------------------------------
        if (status.equals("AB")) {
            out.print("<option value=\"AB\" selected>");
        } else {
            out.print("<option value=\"AB\">");
        }
        out.print("AB</option>");
        //-----------------------------------------
        if (status.equals("IAB")) {
            out.print("<option value=\"IAB\" selected>");
        } else {
            out.print("<option value=\"IAB\">");
        }
        out.print("IAB</option>");
        //-----------------------------------------
        if (status.equals("AF")) {
            out.print("<option value=\"AF\" selected>");
        } else {
            out.print("<option value=\"AF\">");
        }
        out.print("AF</option>");
        //-----------------------------------------
        if (status.equals("GAST")) {
            out.print("<option value=\"GAST\" selected>");
        } else {
            out.print("<option value=\"GAST\">");
        }
        out.print("GAST</option>");
        //-----------------------------------------
        if (status.equals("CHOR")) {
            out.print("<option value=\"CHOR\" selected>");
        } else {
            out.print("<option value=\"CHOR\">");
        }
        out.print("CHOR</option>");
        //------------------------------------------
        if (status.equals("VG")) {
            out.print("<option value=\"VG\" selected>");
        } else {
            out.print("<option value=\"VG\">");
        }
        out.print("VG</option>");
                                %>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>Intern:&nbsp;</td>
                        <td><%= intern%></td>
                        <td colspan=2>
                            <select name="intern" >
                                <%
        if (intern.equals("0")) {
            out.print("<option value=\"0\" selected>0</option>");
            out.print("<option value=\"1\">1</option>");
        } else {
            out.print("<option value=\"1\" selected>1</option>");
            out.print("<option value=\"0\">0</option>");
        }

                                %>
                            </select>

                        </td>
                    </tr>
                    <tr>
                        <td colspan=4><input type="button" name="rs" value="Abbrechen" onClick="location.replace('users.jsp')"/>
                            <input type="hidden" name="id" value="<%= id%>"/>
                        <input type="submit" value="Speichern"/></td>

                    </tr>
                </tbody>

            </table>

        </form>
    </body>
</html>
